#pragma once

#include <stdint.h>
#include <iterator>
#include <vector>
#include "list.h"


namespace msl {

template<typename K, typename T>
class HashTableMap {
    private:
    unsigned int collisions;
    unsigned int table_size;
    size_t el_count;
    std::vector<List<std::pair<K, T> > > els; 

    public:
    HashTableMap(unsigned int table_size = 256);

    public:
    void insert(std::pair<K, T> el);
    void insert(K el_key, T el_value);
    T find(K key);
    bool erase(K key);
    std::vector<T> get_all();
    size_t size();
    unsigned int collision_count();

    public:
    uint32_t key_to_harg(K key); // harg - hash argument
    int hash(uint32_t harg); // default_hash
};

};


#include "hash_table.hpp"

